package com.guo.hui.config;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @ClassName EncryptionUtil
 * @Description 使用统一加密算法
 * @Author zhengguohui
 * @Date 2018/9/4 11:38
 */
public class EncryptionUtil {

    public static PasswordEncoder getBCryptEncoder() {
        return new BCryptPasswordEncoder();
    }

    public static String getBCryptData(String data) {
        return getBCryptEncoder().encode(data);
    }


}
